{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <!-- 表单头部 -->
                <div class="card-header">
                    <div class="btn-group">
                        <a class="btn flat btn-sm btn-default BackButton">
                            <i class="fas fa-arrow-left"></i>
                            返回
                        </a>
                    </div>
                </div>
                <!-- 表单 -->
                <form id="dataForm" class="form-horizontal dataForm" action="" method="post" enctype="multipart/form-data">
                    <!-- 表单字段区域 -->
                    <div class="card-body">
                        <div class="form-group row">
                            <label for="number" class="col-sm-2 col-form-label ">渠道号</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="number" name="number" value="{$data.number|default=$number}"
                                       placeholder="" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">渠道名称</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="name" value="{$data.name|default=''}"
                                       placeholder="请输入渠道名称" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">默认url</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="url" value="{$data.url|default=''}"
                                       placeholder="请输入默认url" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">应用识别码</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="app_token" value="{$data.app_token|default=''}"
                                       placeholder="请输入应用识别码" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">安全码</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="auto" value="{$data.auto|default=''}"
                                       placeholder="请输入安全码" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">点击事件</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="event_token" value="{$data.event_token|default=''}"
                                       placeholder="请输入点击事件event_token" >
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="name" class="col-sm-2 col-form-label ">有效事件</label>
                            <div class="col-sm-10 col-md-4 formInputDiv">
                                <input type="text" class="form-control"
                                       id="name" name="yx_event_token" value="{$data.yx_event_token|default=''}"
                                       placeholder="请输入有效事件event_token" >
                            </div>
                        </div>
                    </div>
                    <!-- 表单底部 -->
                    <div class="card-footer">
                        <div class="row">
                            <div class="col-sm-2">
                            </div>

                            <div class="col-sm-10 col-md-4 formInputDiv">

                                <div class="btn-group">
                                    <button type="submit" class="btn btn-sm btn-primary dataFormSubmit">
                                        保 存
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button type="reset" class="btn btn-sm btn-default dataFormReset">
                                        重 置
                                    </button>
                                </div>

                                {if !isset($data)}
                                <div class="btn-group float-right createContinueDiv">
                                    <input type="checkbox" class="form-check-input" value="1" id="_create" name="_create" title="继续添加数据">
                                    <label class="form-check-label" for="_create">继续添加</label>
                                </div>
                                {/if}
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
<script>
    /** 表单验证 **/
    $('#dataForm').validate({
        rules: {
            
        },
        messages: {
            
        }
    });
</script>
{/block}